﻿using AgileShare.Framework.Library.Helpers;
using Microsoft.VisualStudio.TestTools.UnitTesting;
using System;
using Microsoft.SharePoint.Administration;
using System.Reflection;

namespace AgileShare.Framework.Test
{
    
    
    /// <summary>
    ///这是 SPLoggerTest 的测试类，旨在
    ///包含所有 SPLoggerTest 单元测试
    ///</summary>
    [TestClass()]
    public class SPLoggerTest
    {


        private TestContext testContextInstance;

        /// <summary>
        ///获取或设置测试上下文，上下文提供
        ///有关当前测试运行及其功能的信息。
        ///</summary>
        public TestContext TestContext
        {
            get
            {
                return testContextInstance;
            }
            set
            {
                testContextInstance = value;
            }
        }

        #region 附加测试特性
        // 
        //编写测试时，还可使用以下特性:
        //
        //使用 ClassInitialize 在运行类中的第一个测试前先运行代码
        //[ClassInitialize()]
        //public static void MyClassInitialize(TestContext testContext)
        //{
        //}
        //
        //使用 ClassCleanup 在运行完类中的所有测试后再运行代码
        //[ClassCleanup()]
        //public static void MyClassCleanup()
        //{
        //}
        //
        //使用 TestInitialize 在运行每个测试前先运行代码
        //[TestInitialize()]
        //public void MyTestInitialize()
        //{
        //}
        //
        //使用 TestCleanup 在运行完每个测试后运行代码
        //[TestCleanup()]
        //public void MyTestCleanup()
        //{
        //}
        //
        #endregion


        /// <summary>
        ///LogToDeveloper 的测试
        ///</summary>
        [TestMethod()]
        public void LogToDeveloperTest()
        {
            Exception ex = new Exception("测试报错消息1"); // TODO: 初始化为适当的值
            SPLogger.LogToDeveloper(ex);
            //Assert.Inconclusive("无法验证不返回值的方法。");
        }

        /// <summary>
        ///LogToDeveloper 的测试
        ///</summary>
        [TestMethod()]
        public void LogToDeveloperTest1()
        {
            Exception ex = null; // TODO: 初始化为适当的值
            string message = string.Empty; // TODO: 初始化为适当的值
            SPLogger.LogToDeveloper(ex, message);
            Assert.Inconclusive("无法验证不返回值的方法。");
        }

        /// <summary>
        ///LogToDeveloper 的测试
        ///</summary>
        [TestMethod()]
        public void LogToDeveloperTest2()
        {
            Exception ex = null; // TODO: 初始化为适当的值
            string message = string.Empty; // TODO: 初始化为适当的值
            object[] args = null; // TODO: 初始化为适当的值
            SPLogger.LogToDeveloper(ex, message, args);
            Assert.Inconclusive("无法验证不返回值的方法。");
        }

        /// <summary>
        ///LogToDeveloper 的测试
        ///</summary>
        [TestMethod()]
        public void LogToDeveloperTest3()
        {
            string message = string.Empty; // TODO: 初始化为适当的值
            TraceSeverity traceSeverity = new TraceSeverity(); // TODO: 初始化为适当的值
            SPLogger.LogToDeveloper(message, traceSeverity);
            Assert.Inconclusive("无法验证不返回值的方法。");
        }

        /// <summary>
        ///LogToDeveloper 的测试
        ///</summary>
        [TestMethod()]
        public void LogToDeveloperTest4()
        {
            TraceSeverity traceSeverity = new TraceSeverity(); // TODO: 初始化为适当的值
            string message = string.Empty; // TODO: 初始化为适当的值
            object[] args = null; // TODO: 初始化为适当的值
            SPLogger.LogToDeveloper(traceSeverity, message, args);
            Assert.Inconclusive("无法验证不返回值的方法。");
        }

        /// <summary>
        ///LogToDeveloper 的测试
        ///</summary>
        [TestMethod()]
        public void LogToDeveloperTest5()
        {
            TraceSeverity traceSeverity = new TraceSeverity(); // TODO: 初始化为适当的值
            MemberInfo memberInfo = null; // TODO: 初始化为适当的值
            string message = string.Empty; // TODO: 初始化为适当的值
            object[] args = null; // TODO: 初始化为适当的值
            SPLogger.LogToDeveloper(traceSeverity, memberInfo, message, args);
            Assert.Inconclusive("无法验证不返回值的方法。");
        }

        /// <summary>
        ///LogToDeveloper 的测试
        ///</summary>
        [TestMethod()]
        public void LogToDeveloperTest6()
        {
            TraceSeverity traceSeverity = new TraceSeverity(); // TODO: 初始化为适当的值
            MemberInfo memberInfo = null; // TODO: 初始化为适当的值
            string message = string.Empty; // TODO: 初始化为适当的值
            SPLogger.LogToDeveloper(traceSeverity, memberInfo, message);
            Assert.Inconclusive("无法验证不返回值的方法。");
        }

        /// <summary>
        ///LogToDeveloper 的测试
        ///</summary>
        [TestMethod()]
        public void LogToDeveloperTest7()
        {
            string additionalMessage = string.Empty; // TODO: 初始化为适当的值
            SPLogger.LogToDeveloper(additionalMessage);
            Assert.Inconclusive("无法验证不返回值的方法。");
        }

        /// <summary>
        ///LogToOperations 的测试
        ///</summary>
        [TestMethod()]
        public void LogToOperationsTest()
        {
            Exception ex = null; // TODO: 初始化为适当的值
            SPLogger.LogToOperations(ex);
            Assert.Inconclusive("无法验证不返回值的方法。");
        }

        /// <summary>
        ///LogToOperations 的测试
        ///</summary>
        [TestMethod()]
        public void LogToOperationsTest1()
        {
            Exception ex = null; // TODO: 初始化为适当的值
            string message = string.Empty; // TODO: 初始化为适当的值
            SPLogger.LogToOperations(ex, message);
            Assert.Inconclusive("无法验证不返回值的方法。");
        }

        /// <summary>
        ///LogToOperations 的测试
        ///</summary>
        [TestMethod()]
        public void LogToOperationsTest2()
        {
            Exception ex = null; // TODO: 初始化为适当的值
            string message = string.Empty; // TODO: 初始化为适当的值
            object[] args = null; // TODO: 初始化为适当的值
            SPLogger.LogToOperations(ex, message, args);
            Assert.Inconclusive("无法验证不返回值的方法。");
        }

        /// <summary>
        ///LogToOperationsExtended 的测试
        ///</summary>
        [TestMethod()]
        public void LogToOperationsExtendedTest()
        {
            Exception exception = new Exception("测试写入系统日志"); // TODO: 初始化为适当的值
            string className = "AgileShare Framework"; // TODO: 初始化为适当的值
            string methodName = ""; // TODO: 初始化为适当的值
            string message = exception.Message; // TODO: 初始化为适当的值
            object[] args = null; // TODO: 初始化为适当的值
            SPLogger.LogToOperationsExtended(exception, className, methodName, message, args);
            //Assert.Inconclusive("无法验证不返回值的方法。");
        }

        /// <summary>
        ///LogToOperationsExtended 的测试
        ///</summary>
        [TestMethod()]
        public void LogToOperationsExtendedTest1()
        {
            Exception exception = new Exception("测试写入系统日志"); // TODO: 初始化为适当的值
            string className = "AgileShare Framework"; // TODO: 初始化为适当的值
            string methodName = ""; // TODO: 初始化为适当的值
            string message = exception.Message; // TODO: 初始化为适当的值
            SPLogger.LogToOperationsExtended(exception, className, methodName, message);
            //Assert.Inconclusive("无法验证不返回值的方法。");
        }

        /// <summary>
        ///LogToOperationsExtended 的测试
        ///</summary>
        [TestMethod()]
        public void LogToOperationsExtendedTest2()
        {
            Exception exception = null; // TODO: 初始化为适当的值
            string className = string.Empty; // TODO: 初始化为适当的值
            string methodName = string.Empty; // TODO: 初始化为适当的值
            SPLogger.LogToOperationsExtended(exception, className, methodName);
            Assert.Inconclusive("无法验证不返回值的方法。");
        }
    }
}
